package com.lxs.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lxs.demo.entity.Bill;
import com.lxs.demo.mapper.BillMapper;
import com.lxs.demo.service.IBillService;
import org.springframework.stereotype.Service;

@Service
public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements IBillService {

    @Override
    public PageInfo<Bill> listPage(Bill bill, int pageNum, int pageSize) {
        return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> {
            getBaseMapper().select(bill); //自定义映射文件的查询
        });
    }
}
